import { Product } from '../services/product.service';
import { SeckillActivity, SeckillProduct } from '../services/seckill.service';
import { Order, OrderItem } from '../services/order.service';

// Mock Products
export const products: Product[] = [
  {
    id: 1,
    name: 'iPhone 13 Pro',
    description: '苹果最新旗舰手机，搭载A15仿生芯片，超强性能',
    price: 7999,
    stock: 100,
    imageUrl: 'https://img.alicdn.com/imgextra/i3/2616970884/O1CN01u1JmfV1IOuSKJMkJ1_!!2616970884.jpg',
    category: 'electronics',
    createdAt: '2023-01-01T00:00:00Z',
    updatedAt: '2023-01-01T00:00:00Z',
  },
  {
    id: 2,
    name: 'MacBook Pro 14英寸',
    description: '搭载M1 Pro芯片，强大的图形处理能力，专业人士的选择',
    price: 14999,
    stock: 50,
    imageUrl: 'https://img.alicdn.com/imgextra/i1/2616970884/O1CN01sFQqYH1IOuSJvJoT7_!!2616970884.jpg',
    category: 'electronics',
    createdAt: '2023-01-02T00:00:00Z',
    updatedAt: '2023-01-02T00:00:00Z',
  },
  {
    id: 3,
    name: 'AirPods Pro',
    description: '主动降噪，通透模式，空间音频，带来沉浸式聆听体验',
    price: 1999,
    stock: 200,
    imageUrl: 'https://img.alicdn.com/imgextra/i4/2616970884/O1CN01Urn6nP1IOuSLPGDZY_!!2616970884.jpg',
    category: 'electronics',
    createdAt: '2023-01-03T00:00:00Z',
    updatedAt: '2023-01-03T00:00:00Z',
  },
  {
    id: 4,
    name: 'Nike Air Max 270',
    description: '舒适缓震，轻盈透气，时尚外观，适合日常穿着',
    price: 999,
    stock: 300,
    imageUrl: 'https://img.alicdn.com/imgextra/i1/2451941673/O1CN01FRs1qR1OVKLVVJcXI_!!2451941673.jpg',
    category: 'clothing',
    createdAt: '2023-01-04T00:00:00Z',
    updatedAt: '2023-01-04T00:00:00Z',
  },
  {
    id: 5,
    name: 'Dyson吸尘器V11',
    description: '强劲吸力，智能感应，长效续航，让清洁更轻松',
    price: 4999,
    stock: 80,
    imageUrl: 'https://img.alicdn.com/imgextra/i3/2838892713/O1CN01FgYqZA1Vub8ixeKQS_!!2838892713.jpg',
    category: 'home',
    createdAt: '2023-01-05T00:00:00Z',
    updatedAt: '2023-01-05T00:00:00Z',
  },
  {
    id: 6,
    name: 'SK-II神仙水',
    description: '精华液，改善肤质，提亮肤色，修护受损肌肤',
    price: 1599,
    stock: 150,
    imageUrl: 'https://img.alicdn.com/imgextra/i4/2206428723062/O1CN01ICk1Xt1cGpDPJLCsA_!!2206428723062.jpg',
    category: 'beauty',
    createdAt: '2023-01-06T00:00:00Z',
    updatedAt: '2023-01-06T00:00:00Z',
  },
  {
    id: 7,
    name: '三只松鼠坚果礼盒',
    description: '多种坚果组合，营养丰富，送礼自用两相宜',
    price: 199,
    stock: 500,
    imageUrl: 'https://img.alicdn.com/imgextra/i1/2206583552302/O1CN01MYfqmP23yKpXNQTmd_!!2206583552302.jpg',
    category: 'food',
    createdAt: '2023-01-07T00:00:00Z',
    updatedAt: '2023-01-07T00:00:00Z',
  },
  {
    id: 8,
    name: 'Switch游戏机',
    description: '任天堂便携式游戏机，家用与便携两用，多人游戏更欢乐',
    price: 2099,
    stock: 120,
    imageUrl: 'https://img.alicdn.com/imgextra/i1/2206502247304/O1CN01tGWGCL1e2OdJHSKQK_!!2206502247304.jpg',
    category: 'electronics',
    createdAt: '2023-01-08T00:00:00Z',
    updatedAt: '2023-01-08T00:00:00Z',
  },
];

// Mock Seckill Products
export const seckillProducts: SeckillProduct[] = [
  {
    id: 1,
    productId: 1,
    product: products[0],
    seckillPrice: 6999,
    stock: 50,
    limitPerUser: 1,
    sold: 30,
  },
  {
    id: 2,
    productId: 3,
    product: products[2],
    seckillPrice: 1499,
    stock: 100,
    limitPerUser: 2,
    sold: 80,
  },
  {
    id: 3,
    productId: 5,
    product: products[4],
    seckillPrice: 3999,
    stock: 30,
    limitPerUser: 1,
    sold: 20,
  },
  {
    id: 4,
    productId: 7,
    product: products[6],
    seckillPrice: 99,
    stock: 200,
    limitPerUser: 3,
    sold: 150,
  },
];

// Mock Seckill Activities
export const seckillActivities: SeckillActivity[] = [
  {
    id: 1,
    name: '618电子产品大促',
    description: '年中大促，电子产品限时秒杀，错过等一年',
    startTime: new Date(new Date().getTime() - 2 * 24 * 60 * 60 * 1000).toISOString(), // 2 days ago
    endTime: new Date(new Date().getTime() + 3 * 24 * 60 * 60 * 1000).toISOString(), // 3 days from now
    status: 'active',
    products: [seckillProducts[0], seckillProducts[1]],
    createdAt: '2023-06-01T00:00:00Z',
    updatedAt: '2023-06-01T00:00:00Z',
  },
  {
    id: 2,
    name: '家居清洁用品特卖',
    description: '家居清洁用品限时特价，让家更干净',
    startTime: new Date(new Date().getTime() + 2 * 24 * 60 * 60 * 1000).toISOString(), // 2 days from now
    endTime: new Date(new Date().getTime() + 5 * 24 * 60 * 60 * 1000).toISOString(), // 5 days from now
    status: 'upcoming',
    products: [seckillProducts[2]],
    createdAt: '2023-06-05T00:00:00Z',
    updatedAt: '2023-06-05T00:00:00Z',
  },
  {
    id: 3,
    name: '零食饮料大放价',
    description: '各类零食饮料限时秒杀，满足你的味蕾',
    startTime: new Date(new Date().getTime() - 10 * 24 * 60 * 60 * 1000).toISOString(), // 10 days ago
    endTime: new Date(new Date().getTime() - 5 * 24 * 60 * 60 * 1000).toISOString(), // 5 days ago
    status: 'ended',
    products: [seckillProducts[3]],
    createdAt: '2023-05-20T00:00:00Z',
    updatedAt: '2023-05-20T00:00:00Z',
  },
];

// Mock Order Items
export const orderItems: OrderItem[] = [
  {
    id: 1,
    orderId: 1,
    productId: 1,
    product: products[0],
    quantity: 1,
    price: 6999,
  },
  {
    id: 2,
    orderId: 2,
    productId: 3,
    product: products[2],
    quantity: 2,
    price: 1499,
  },
  {
    id: 3,
    orderId: 3,
    productId: 5,
    product: products[4],
    quantity: 1,
    price: 3999,
  },
];

// Mock Orders
export const orders: Order[] = [
  {
    id: 1,
    userId: 1,
    orderNumber: 'SO20230610001',
    totalAmount: 6999,
    status: 'pending',
    items: [orderItems[0]],
    createdAt: '2023-06-10T10:30:00Z',
    updatedAt: '2023-06-10T10:30:00Z',
  },
  {
    id: 2,
    userId: 1,
    orderNumber: 'SO20230605002',
    totalAmount: 2998,
    status: 'paid',
    items: [orderItems[1]],
    paymentMethod: 'alipay',
    paymentId: 'AP20230605001',
    createdAt: '2023-06-05T14:20:00Z',
    updatedAt: '2023-06-05T14:25:00Z',
  },
  {
    id: 3,
    userId: 1,
    orderNumber: 'SO20230601003',
    totalAmount: 3999,
    status: 'completed',
    items: [orderItems[2]],
    paymentMethod: 'wechat',
    paymentId: 'WP20230601001',
    createdAt: '2023-06-01T09:15:00Z',
    updatedAt: '2023-06-01T09:20:00Z',
  },
]; 